package com.fanghuaiming.ml.pay.order.spi.fallback;

import com.fanghuaiming.ml.common.model.common.order.MessageListOrderDTO;
import com.fanghuaiming.ml.common.model.enumeration.OrderTransactionEnum;
import com.fanghuaiming.ml.pay.order.spi.MessageListOrderFeignClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/****
 * @description: 订单微服务熔断降级
 * @version:1.0.0
 * @author fanghuaiming
 * @data Created in 2020/11/27 下午6:01
 *
 */
@Component
@Slf4j
public class MessageListOrderFeignClientFallBack implements MessageListOrderFeignClient {

    /**
     * @Description: 熔断降级处理
     *
     * @param:
     * @return:
     * @auther: fanghuaiming
     * @date: 2020/12/4 下午3:14
     * @version:1.0.0
     */
    @Override
    public OrderTransactionEnum dealOrder(MessageListOrderDTO messageListOrderDTO) {
        log.error("调用订单微服务处理订单异常,触发熔断降级");
        return OrderTransactionEnum.FALL_BACK;
    }

}
